//package com.example.bloglearn.controller;
//
//import com.example.bloglearn.entity.User;
//import com.example.bloglearn.mapper.UserMapper;
//import org.springframework.beans.factory.annotation.Autowired;
//import org.springframework.stereotype.Controller;
//import org.springframework.web.bind.annotation.GetMapping;
//import org.springframework.web.bind.annotation.RequestMapping;
//import org.springframework.web.bind.annotation.RequestParam;
//
//import javax.annotation.Resource;
//import java.util.List;
//
//@Controller
//public class UserController {
//
//    @Autowired
//    private UserMapper userMapper;
//
//    @GetMapping("/user/findall")
//    public List<User> index(){
//        return userMapper.findAll();
//    }
//
//    @RequestMapping("/login")
//    public String login(@RequestParam("userphone") String userphone, @RequestParam("userpass") String userpass){
//      String result = "登录失败";
//      List<User> list = userMapper.login(userphone,userpass);
//     if(list.size() >0){
//        result = "登录成功";
//    }
//    return result;
//}
//
//
//}
